<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #text{
            font-weight: 800;
            font-size: 50px;
        }
    </style>
</head>
<body>
    <div id="text">
        <p>{{ isShow == true ? 'Hello World' : 'dlroW olleH' }}</p>
        <button v-on:click="reverse">逆转世界</button>
    </div>

    <script src="../work1/js/vue.js"></script>
    <script>
        const app = new Vue({
            el:'#text',
            data:{
               isShow:true
            },
            methods:{
                reverse(){
                    this.isShow = !this.isShow
                }
            }
        })
    </script>
</body>
</html>